package com.huahan.auth.controller;

import com.huahan.auth.service.UserService;
import com.mall.common.constant.LoginInfoParam;
import com.mall.common.utils.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/base")
public class LoginController  {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    R login(LoginInfoParam loginInfoParam) {
        return userService.login(loginInfoParam);
    }
}
